package com.youthburin.base.services;

import java.io.Serializable;
import java.util.List;

import org.springframework.data.domain.Sort;

import com.youthburin.base.util.DwzPagination;

public interface BaseService<T, ID extends Serializable> {
	public void dwzFindAll(DwzPagination dwzPagination);

	public List<T> findAll();

	public List<T> findAll(Sort sort);

	public T save(T t);

	/**
	 * 更新成功，则返回更新后的对象，否则返回null
	 * 
	 * @param t
	 * @return
	 */
	public T update(T t);

	public void delete(List<ID> idList);

	public void delete(ID id);

	public void delete(T t);

	public T get(ID id);

	boolean exists(ID id);

}
